<div class="comment-area" id="comments">
    <form class="js-ajax-form" action="{:cmf_plugin_url('TcComment://Index/index')}" method="post">
        <input type="hidden" name="post[object_id]" id="inpId" value="{$object_id}" />
        <input type="hidden" name="post[table_name]" id="tablename" value="{$table_name}" />
        <p>
            <textarea class="form-control comment-postbox" placeholder="" style="min-height:90px;" name="post[content]"></textarea>
        </p>
        <p>
            <button type="submit" class="btn btn-sm btn-secondary js-ajax-submit">发送</button>
        </p>
    </form>
    <hr>
    <div class="comments">
        <foreach name="comments" item="vo">
            <div class="comment" data-id="{$vo.id}" data-uid="{$vo.user_id}" data-username="{$vo.full_name}" id="comment{$vo.id}">
                <div class="media">
                    <a class="d-block" href="{$vo.url}">
                        <if condition="empty($vo.avatar)">
                            <img src="/assets/dist/images/headicon-m.png" class="mr-3 rounded-circle headimg"/>
                            <else />
                            <img src="{:cmf_get_user_avatar_url($vo.avatar)}" class="mr-3 rounded-circle headimg"/>
                        </if>
                    </a>
                    <div class="media-body">
                        <p class="mb-1"><a href="{$vo.url}" class="text-secondary">{$vo.full_name}</a> · <span class="text-secondary" time="{$vo.create_time}">{:func_friendly_time($vo.create_time)}</span></p>
                        <div class="comment-content">{$vo.content}</div>
                    </div>
                </div>
                <hr>
            </div>
        </foreach>
        <ul class="pagination">
            {$page}
        </ul>
    </div>
</div>